package com.xunk.scene.domain;

import com.xunk.scene.constant.SceneConstant;
import lombok.*;

/**
 * @ProjectName: HIM
 * @Package: com.xunk.scene.domain
 * @ClassName: DeviceNotifyEntity
 * @Author: luanzhiwei
 * @Description: 设备通知实体类
 * @Date: 2021/5/14 10:49
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@EqualsAndHashCode
public class DeviceNotifyEntity {
    /**
     * 设备号
     */
    private String deviceSn;
    /**
     * 设备属性
     */
    private String type;
    /**
     * 设备属性值
     */
    private String value;

    /**
     * 拼接缓存在redis中的格式
     *
     * @return
     */
    public String getRedisValue() {
        return String.format("%s%s%s", getDeviceSn(), SceneConstant.SEPARATOR_EQUIPMENT, getType());
    }

}
